{%extends 'base_user_center.html'%}
{%block right_content%}
		<div class="right_content clearfix">
				<h3 class="common_title2">收货地址</h3>
				<div class="site_con">
					<dl>
						<dt>当前地址：</dt>

						<dd>{%if addr%}
							{{addr.addr}} ({{addr.receiver}} 收) {{addr.phone}}
							{%else%}
							无
							{%endif%}
						</dd>
					</dl>					
				</div>
				<h3 class="common_title2">编辑地址</h3>
				<div class="site_con">
					<form method="POST">
						{%csrf_token%}
						<div class="form_group">
							<label>收件人：</label>
							<input type="text" name="receiver">
						</div>
						<div class="form_group form_group2">
							<label>详细地址：</label>
							<textarea class="site_area" name="addr"></textarea>
						</div>
						<div class="form_group">
							<label>邮编：</label>
							<input type="text" name="zipcode">
						</div>
						<div class="form_group">
							<label>手机：</label>
							<input type="text" name="phone">
						</div>
						<p style="color: red;">{{errmsg}}</p>
						<input type="submit" name="" value="提交" class="info_submit">
					</form>
				</div>
		</div>
{%endblock right_content%}
{%load static%}
{%block bottomfiles%}
<script src='{%static "js/jquery-1.12.4.min.js"%}'></script>
<script>
	var a=$('.active')
	a.removeClass('active')
	console.log(a)
	a=a.eq(0)
	console.log(a)
	a=a.parent().siblings()
	console.log(a)
	a.eq(1).children().addClass('active')
</script>
{%endblock bottomfiles%}